﻿using Microsoft.EntityFrameworkCore;
using PropertyManagment.config;
using PropertyManagment.entity;
using PropertyManagment.entity.dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace PropertyManagment.mapper {
    public interface BaseMapper<T> where T : BaseEntity {

        public IEnumerable<T> getAll();
        public T getById(long id);
        public IEnumerable<T> selectBatchIds(ICollection<long> idList);
        public T add(T data);
        public IEnumerable<T> addBatch(ICollection<T> dataList);
        public T delete(long id);
        public IEnumerable<T> deleteBatch(ICollection<T> dataList);
        public IEnumerable<T> deleteBatchIds(ICollection<long> idList);
        public T update(T updateData);
        public Page<T> page(Page<T> page);
    }
}
